<?php
/**
 * Created by PhpStorm.
 * User: Vito
 * Date: 2022/3/30
 * Time: 16:54
 */

namespace app\command;


use think\console\Command;
use app\common\EventName;
use think\console\Input;
use think\console\input\Option;
use think\console\Output;
use think\facade\Event;
/**
 * 生成CURD类
 * php think make:curd admin@user/User
 * --only read,save  只允许生成read和save
 * --except read 排除read
 * Class MakeCurd
 * @package app\command
 */
class Timing extends Command
{
   
    

    protected function configure()
    {
        $this->setName('timing')
        ->setDescription('start timing');
    }

    protected function execute(Input $input, Output $output)
    {
        try {
            $this->output->writeln("我被调用了");
            Event::trigger(EventName::CRONTAB_TASK);
        } catch (\Throwable $e) {
            dump('Error:' . $e->getMessage() . ' in ' . $e->getFile() . ' on line ' . $e->getLine());
        }
    }
}